package com.demo.handphone.handphone.utils;

import com.demo.handphone.handphone.CheckCardTime;

/**
 * PDK配置信息
* @author wxg
* @date 2016-12-3 下午3:34:10
 */
public class CheckCardTimeUtils {
	
	private static CheckCardTimeUtils instance;
	
	/**
	 * PDK配置信息
	 */
	private static CheckCardTime checkCardTime = new CheckCardTime();
	
	/**
	 * 不让外部采用new 的方式调用本类，只允许使用单例模式
	 */
	private CheckCardTimeUtils() {
		
	}
	
	/**
	 * 获取当前对象的实例
	 * @author sw
	 * @date 2016-3-10 下午3:20:56
	 * @return
	 */
	public static CheckCardTimeUtils getInstance() {
		if (instance == null) {
			synchronized (CheckCardTimeUtils.class) {
				instance = new CheckCardTimeUtils();
			}
		}
		return instance;
	}
	/**
	 * 修改当前检票时间
	 */
	public boolean updateCheckCardTime(CheckCardTime vo) {
		if (vo != null && !StringUtils.isEmpty(vo.getCardNo()) && vo.getLastCheckTime() != null) {
			checkCardTime = vo;
			return true;
		} else {
			return false;
		}
	}

	public static CheckCardTime getCheckCardTime() {
		return checkCardTime;
	}

	public static void setCheckCardTime(CheckCardTime checkCardTime) {
		CheckCardTimeUtils.checkCardTime = checkCardTime;
	}
	
	
}
